﻿using System;
using System.ServiceModel;

namespace ExplorerService.Common.ServiceContracts
{
    /// <summary>
    /// Service used by applications to transfer files (chunked)
    /// </summary>
    [ServiceContract]
    public interface IApplicationStreamingService
    {
        /// <summary>
        /// Uploads a new chunk of a file to an upload stream
        /// </summary>
        [OperationContract]
        void UploadStreamChunk(Guid applicationSessionId, Guid streamId, byte[] chunk, long bytesLeft);

        /// <summary>
        /// Requests a new chuck from a stream
        /// </summary>
        [OperationContract]
        byte[] GetNextStreamChunk(Guid applicationId, Guid streamId);
    }

    
}
